//package com.ruoyu.cloud.ai.controller;
//
//import com.ruoyu.cloud.ai.service.DocumentSverice;
//import jakarta.annotation.Resource;
//import org.springframework.ai.document.Document;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@RestController
//@RequestMapping("/ai")
//public class DocumentReaderController {
//
//    @Resource
//    private DocumentSverice documentSverice;
//
//    @GetMapping("/loadText")
//    public List<Document> document() {
//        return documentSverice.loadText();
//    }
//
//    @GetMapping("/search")
//    public List<Document> search(String msg) {
//        List<Document> search = documentSverice.search(msg);
//        return search;
//    }
//
//    @GetMapping("/metadataSearch")
//    public List<Document> metadataSearch(String msg, String question) {
//        List<Document> metadataSearch = documentSverice.metadataSearch(msg, question);
//        return metadataSearch;
//    }
//}
